package JUC;

import java.util.function.Supplier;

public class TestSupplier {
    public static void main(String[] args) {
        // Supplier<T>接口（供给型接口）,没有参数，只有返回值
//        Supplier<String> mySupplier = new Supplier() {
//            @Override
//            public String get() {
//                return "jxc";
//            }
//        };
        Supplier<String> mySupplier = (Supplier) () -> "jxc";
        System.out.println(mySupplier.get());
    }
}
